﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>诚信评价管理系统</title>
</head>
<body background="wx_43.jpg">
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server">
    </ext:ScriptManager>
    <br><br><br><br>
    <center><font style="font-size:35px;font-family:"微软雅黑",Microsoft YaHei, Verdana, Geneva, sans-serif;">诚信档案管理信息系统</center>
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CXDB %>" 
        SelectCommand="SELECT [DeptName], [ID] FROM [CX_SYS_Dept] WHERE ([DeptID] = @DeptID)">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="DeptID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <ext:Store ID="Store1" DataSourceID="SqlDataSource1" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Type="Int"></ext:RecordField>
                    <ext:RecordField Name="DeptName" Type="String"></ext:RecordField>
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="Store2"  runat="server">
    <Reader>
        <ext:JsonReader ReaderID="uid">
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>                
            </Fields>
        </ext:JsonReader>
    </Reader> 
    </ext:Store>
    <ext:Window ID="Window1" runat="server"  Modal="true" Closable="false" 
        Resizable="false" Height="150" Width="350" BodyStyle="padding:10px;" Icon="Lock" 
        Title="用户登录" Draggable="False" ExpandOnShow="False">
        <Body>
            <ext:FormPanel ID="FormPanel1"  runat="server" ButtonAlign="Right"  BaseCls="x-plan">
                <Body>
                    <ext:FormLayout ID="FormLayout1" runat="server" LabelWidth="60" LabelCls="10" LabelAlign="Left">
                        <ext:Anchor >
                            <ext:ComboBox runat="server" ID="ComboBox1" StoreID="Store1" DisplayField="DeptName" 
                            ValueField="ID" FieldLabel="部门" EmptyText="请选择"
                             TriggerAction="All" SelectOnFocus="true" Mode="Local" ForceSelection="true" TypeAhead="true">
                                <Listeners>
                                    <Select Handler="#{ComboBox2}.clearValue();#{AjaxMethods}.userBind();" Buffer="250"/>
                                </Listeners> 
                            </ext:ComboBox>
                        </ext:Anchor>
                        <ext:Anchor>
                            <ext:ComboBox runat="server" ID="ComboBox2" StoreID="Store2"
                            TriggerAction="All" SelectOnFocus="true" Mode="Local" EmptyText="请选择" ForceSelection="true" TypeAhead="true"
                             DisplayField="username" ValueField="uid" FieldLabel="用户名">
                            
                            </ext:ComboBox>
                        </ext:Anchor> 
                        <ext:Anchor Horizontal="100%">
                            <ext:TextField ID="TfPassWd" runat="server" FieldLabel="密码"       InputType="Password">
                            </ext:TextField>
                        </ext:Anchor>
                    </ext:FormLayout>
                </Body>
                <Buttons>
                    <ext:Button ID="Button1" runat="server" Icon="Accept" Type="Submit" Text="登录">
                    <AjaxEvents>
                        <Click OnEvent="LoginChk">
                            <EventMask ShowMask="true" Msg="登录中..." MinDelay="2000" />
                        </Click>  
                                         
                    </AjaxEvents>
                    
                    </ext:Button>
                </Buttons>
            </ext:FormPanel>
        </Body>
    </ext:Window>
    </form>
</body>
</html>
